app.controller('jiukuaijiuCtrl', function($scope, $http) {
	$('.jingxuan').addClass('baco')
	
	$scope.aaa = 111
//	http://api.chuchujie.com/api?client={"ageGroup":"AG_0to24","channel":"QD_web_webkit","deviceId":"0","gender":"0","imei":"0","packageName":"com.culiu.purchase","platform":"wap","sessionId":"0","shopToken":"0","userId":"0","version":"1.0","xingeToken":""}&query={"module":"99","tab":"all"}
	function  show1() {
		$http.get('/api/api', {
		params: {
			client:{"ageGroup":"AG_0to24","channel":"QD_web_webkit","deviceId":"0","gender":"0","imei":"0","packageName":"com.culiu.purchase","platform":"wap","sessionId":"0","shopToken":"0","userId":"0","version":"1.0","xingeToken":""},
			query:{"module":"99","tab":"all"}
		}
	}).then(function(res) {
		$scope.jiukuai = res.data
         console.log($scope.jiukuai)
	})
	}
	
	show1()
	
	
	$('.jingxuan').click(function  () {
//		console.log(111)
		
		$('.jingxuan').addClass('baco')
		$('.jingxuan_men').removeClass('baco')
		show1()
	})
	$('.jingxuan_men').click(function  () {
		$('.jingxuan_men').addClass('baco')
		$('.jingxuan').removeClass('baco')

//	http://api.chuchujie.com/api?client={"ageGroup":"AG_0to24","channel":"QD_web_webkit","deviceId":"0","gender":"1","imei":"0","packageName":"com.culiu.purchase","platform":"wap","sessionId":"0","shopToken":"0","userId":"0","version":"1.0","xingeToken":""}&query={"module":"99","tab":"all"}	
		$http.get('/api/api', {
		params: {
			client:{"ageGroup":"AG_0to24","channel":"QD_web_webkit","deviceId":"0","gender":"1","imei":"0","packageName":"com.culiu.purchase","platform":"wap","sessionId":"0","shopToken":"0","userId":"0","version":"1.0","xingeToken":""},
			query:{"module":"99","tab":"all"}
		}
	}).then(function(res) {
		console.log(2222)
		$scope.jiu = res.data
         
	})
		
		
	})
	
	$scope.num = 1
	
	$scope.loddingwomen = function  () {
		
		$scope.num++
		
		
		if ($scope.num >= 13) {
			$('.loading').fadeOut()
			$('.lodding1').fadeIn()
			return
		}

$http.get('/api/api', {
		params: {
			client:{"ageGroup":"AG_0to24","channel":"QD_web_webkit","deviceId":"0","gender":"1","imei":"0","packageName":"com.culiu.purchase","platform":"wap","sessionId":"0","shopToken":"0","userId":"0","version":"1.0","xingeToken":""},
			query:{"group":4,"module":"99","page":$scope.num,"tab":"all"},
			page:$scope.num
		}
	}).then(function(res) {
		console.log(res)
//		$scope.jiu = res.data
$scope.jiukuai.data.groupList[1].dataList= $scope.jiukuai.data.groupList[1].dataList.concat(res.data.data.groupList[0].dataList)
        
        
	})
		
		
	}
	
	$scope.num1 = 1
	
	$scope.loddingmen = function  () {
		
		$scope.num1++
		
		
		if ($scope.num1 >= 13) {
			$('.loading').fadeOut()
			$('.lodding1').fadeIn()
			return
		}

$http.get('/api/api', {
		params: {
			client:{"ageGroup":"AG_0to24","channel":"QD_web_webkit","deviceId":"0","gender":"0","imei":"0","packageName":"com.culiu.purchase","platform":"wap","sessionId":"0","shopToken":"0","userId":"0","version":"1.0","xingeToken":""},
			query:{"group":4,"module":"99","page":$scope.num,"tab":"all"},
			page:$scope.num
		}
	}).then(function(res) {
		console.log(res)
//		$scope.jiu = res.data
$scope.jiu.data.groupList[1].dataList= $scope.jiukuai.data.groupList[1].dataList.concat(res.data.data.groupList[0].dataList)
        
        
	})
		
		
	}
	
	
	
	
	
	
	
})
